﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SDT.Model;
using SDT.Lib.Common;
using System.Linq.Dynamic;
namespace SDT.Site.Controllers
{
    public class MenuController : Controller
    {
        //
        // GET: /Menu/
        SDTDataContext db = new SDTDataContext();
        public ActionResult GetLeft(int id)
        {
            return View();
        }
        public ActionResult GetTop()
        {
            var l = db.Menus.Where(e => (e.PubYN == true) && (e.ParentID == null) && (e.TypeID == MenuListType.Top)).OrderBy(string.Format("{0} {1}", "Priority", "asc")).ToList();
            return View(l);
        }
        public ActionResult GetBottom()
        {
            var l = db.Menus.Where(e => (e.PubYN == true) && (e.ParentID == null) && (e.TypeID == MenuListType.Bottom)).OrderBy(string.Format("{0} {1}", "Priority", "asc")).ToList();
            return View(l);
        }
    }
}
